<!-- 
  加载中。。。。
 -->
<template>
  <div class="loading-wrapper" v-if="value">
    <div class="loading-content">
      <img
        :src="require(`../assets/loading/loading-${type}.gif`)"
        :class="classname"
        :width="width?width:height?height:size + 'px'"
        :height="height?height:width?width:size + 'px'"
      />
    </div>
  </div>
</template>

<script>
export default {
  name: "loading",
  components: {},
  props: {
    type: {
      type: String,
      default: "5",
    },
    classname: {
      type: String,
      default: "",
    },
    size: {
      type: Number,
      default: 200,
    },
    value: {
      type: Boolean,
      default: false,
    },
    width: {
      type: Number,
    },
    height: {
      type: Number,
    },
  },
  data() {
    return {};
  },
  computed:{},
  created() {},
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
.loading-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  background-color: rgba($color: #000, $alpha: 0.7);
  .loading-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}
</style>
